//
//  Common.swift
//  Weibo8023
//
//  Created by styshy on 15/12/7.
//  Copyright © 2015年 sz. All rights reserved.
//

import UIKit


// 全局外观颜色变量
let HMAppearanceTintColor = UIColor.orangeColor()

// MARK: - 全局通知定义
/// 切换根视图控制器通知 － 一定要够长，要有前缀
let WBSwitchRootViewControllerNotification = "WBSwitchRootViewControllerNotification"


let WBStatusSelectedPhotoNotification = "WBStatusSelectedPhotoNotification"

let WBStatusSelectedIndexPathNotification = "WBStatusSelectedIndexPathNotification"

let WBStatusSelectedPhotoURLsKey =  "WBStatusSelectedPhotoURLsKey"

/// 延迟在主线程执行函数
///
/// - parameter delta:    延迟时间 - 秒
/// - parameter callFunc: 回调函数
func delay(delta:Double, callFunc:() -> ()){
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delta * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
        
        // 执行回调任务
        callFunc()
    }
}






